#include "stdafx.h"
#include "POVRay_IO.h"

POVRay_IO* POVRay_IO::_instance=NULL;

POVRay_IO* POVRay_IO::get_instance(){
	if(_instance==NULL){
		_instance=new POVRay_IO();
	}
	return _instance;
}

POVRay_IO::POVRay_IO(void)
{
}

POVRay_IO::~POVRay_IO(void)
{
}

void POVRay_IO::init(char* str){
	output = fopen(str, "w" );
	
}

void POVRay_IO::close(){
	fclose(output);
}

char buf[512];
void POVRay_IO::record(void * buf,int num){
	//Point* p;
	//for (int n=0; n < num; n++) {
	//	p = (Point*) dat;
	//	//<x,y,z>,<r,g,b>
	//	sprintf(buf,"<%d,%d,%d>,<%d,%d,%d>\n",
	//		p->pos.x,, p->pos.y, p->pos.z,
	//		RED(p->clr), GRN(p->clr), BLUE(p->clr));
	//	fwrite(buf,strlen(buf));			
	//	dat += mBuf[0].stride;
	//}
	////out put num
	//sprintf(buf,"%d\n",num);
	//fwrite(buf)
}